package com.mvp.mvpdemo.mvp.contract

import androidx.lifecycle.LiveData
import com.mvp.mvpdemo.base.IBaseView
import com.mvp.mvpdemo.base.IModel
import com.mvp.mvpdemo.base.IPresenter
import com.mvp.mvpdemo.bean.BAnnerBean
import com.mvp.mvpdemo.bean.LoginBean
import com.mvp.mvpdemo.bean.WXBean
import com.retrofit.call_adapter.livedata_call_adapter.ApiResponse
import retrofit2.Call


/**
 * author    : mahongyin
 * e-mail    : mhy.work@foxmail.com
 * date      : 2020-10-28 9:15
 * introduce :
 */
interface HomeContract {

    interface View : IBaseView {

        fun susscess(result: LoginBean)

        fun error()

        fun getBanner(bean: BAnnerBean)
        fun getWX(bean: WXBean)
    }

    interface Presenter : IPresenter<View> {

        fun login(phone: String, pwd: String)
        fun login2(phone: String, pwd: String)
        fun getBanner()
        fun getWX()
    }

    interface Model : IModel {

        fun login(phone: String, pwd: String): Call<LoginBean>
        fun login2(phone: String, pwd: String): Call<LoginBean>
        fun getBanner(): LiveData<ApiResponse<BAnnerBean>>
        fun getWX(): LiveData<ApiResponse<WXBean>>
    }


}